package com.xiaoge.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

/**
 * TODO
 *
 * @author <a href="mailto:1330137071@qq.com">Zhang Xiao</a>
 * @since
 */
@Controller
public class IndexController {

	// 访问127.0.0.1:9898/app/index
	@RequestMapping("/index")
	public String index() {
		System.out.println("-----------------------index-----------------");
		return "index";
	}

	@RequestMapping("/hashMap")
	@ResponseBody
	public Map<String, String> map() {
		System.out.println("-----------------------hashMap-----------------");
		Map<String, String> map = new HashMap<>();
		map.put("1", "2");
		return map;
	}

}
